import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // 是否登录
    userlogin: false,
    // 接受点击的专辑的id
    albunid: 0,
    // 播放歌曲的url
    PlaySongsURL: '',
    // 播放歌曲的ID
    // PlaySongsID:"",
    // 播放歌曲的数据
    PlaySongsData: [],
    // 歌曲详情id
    SongsDetailID: 0
  },
  getters: {
  },
  mutations: {
    isshowlogin (state, data) {
      state.loginbox = data
    },
    ChangeAlbumId (state, data) {
      state.albunid = data
    },
    ChangePlaySongsURL (state, data) {
      state.PlaySongsURL = data
    },
    ChangePlaySongsID (state, data) {
      state.PlaySongsData.id = data
    },
    ChangePlaySongsData (state, data) {
      state.PlaySongsData = data
    },
    // 更改歌曲详情id
    ChangeSongsDetailID (state, data) {
      state.SongsDetailID = data
    }
  },
  actions: {

  },
  modules: {
  }
})
